Conversation
| resource "aws_route" "private_rt_nat_gateway" { | ||
| route_table_id = aws_route_table.private_rt.id | ||
| destination_cidr_block = "0.0.0.0/0" | ||
| nat_gateway_id = aws_nat_gateway.nat_gateway.id | ||
| } | ||
|
|
There was a problem hiding this comment.
What is the difference between this method and the one above for defining the route?
| resource "aws_security_group" "unreal_ddc_load_balancer_access_security_group_region_1" { | ||
| #checkov:skip=CKV2_AWS_5: Security group is attached to a resource | ||
| name = "cgd-load-balancer-sg" | ||
| description = "Access unreal ddc load balancer" | ||
| region = var.regions[0] | ||
| vpc_id = module.unreal_cloud_ddc_vpc_region_1.vpc_id | ||
|
|
||
| tags = local.tags | ||
| } |
Check warning
Code scanning / Checkov
Ensure that Security Groups are attached to another resource
| resource "aws_security_group" "unreal_ddc_load_balancer_access_security_group_region_2" { | ||
| #checkov:skip=CKV2_AWS_5: Security group is attached to a resource | ||
| name = "cgd-load-balancer-sg" | ||
| description = "Access unreal ddc load balancer" | ||
| vpc_id = module.unreal_cloud_ddc_vpc_region_2.vpc_id | ||
| region = var.regions[1] | ||
|
|
||
| tags = local.tags | ||
| } |
Check warning
Code scanning / Checkov
Ensure that Security Groups are attached to another resource
There was a problem hiding this comment.
Checkov found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
…tion issues - Add --lockfile=false to terraform_docs to use versions.tf instead of stale lock files - Add --tf-init-args=-upgrade to terraform_validate to handle provider version mismatches - Add --retry-once-with-cleanup to handle corrupted .terraform directories - Add --quiet to checkov to suppress verbose parsing warnings - Add comprehensive comments explaining each configuration option - Update terraform-docs config to show both Requirements and Providers sections
- Update all README files to show consistent provider versions from versions.tf - Fix terraform-docs generated content with proper Requirements and Providers sections - Apply formatting fixes from terraform_fmt and other pre-commit hooks - Ensure all modules show accurate version information for dependencies
- Add volume mounting (-v) and working directory (-w) to Docker alias - Fixes 'config file not found' error in CI when terraform-docs tries to access .config/.terraform-docs.yml - Uses GITHUB_WORKSPACE for reliable path resolution in GitHub Actions - Allows Docker container to access repository files while keeping config in proper .config/ directory
7534141 to
de7b518
Compare
🚧 DRAFT PR - DO NOT MERGE UNTIL DRAFT STATUS HAS BEEN REMOVED AS WELL AS THIS LINE 🚧
Issue number:
#713
Summary
This PR implements Major DDC Module Architecture Consolidation that eliminates circular dependencies, implements robust cleanup mechanisms, and establishes the gold standard for all CGD Toolkit modules. The fragmented infrastructure/applications split has been replaced with a unified, production-ready conditional submodule architecture.
Problem Statement
Previous Architecture
The DDC module was split across separate
infrastructure/andapplications/modules, which presented some architectural challenges:Areas for Improvement:
User Impact
Solution Overview
New Consolidated Architecture
Following the successful Perforce module pattern, implemented conditional submodule architecture:
Key Architectural Principles
count = var.config != null ? 1 : 0patternMajor Changes
1. Eliminated Circular Dependencies
Before:
After:
2. Implemented Conditional Submodule Pattern
3. Enhanced Multi-Region Support
Before: Complex internal multi-region logic with provider aliases
After: Multiple parent module instances (one per region)
4. Robust Cleanup & Destroy Safety
Added automatic Helm cleanup with comprehensive error handling:
Enhanced error messages with troubleshooting guidance:
5. Improved Asset Organization & Examples Enhancement
Before: File placement that could be more consistent
After: Standardized structure with clear separation:
Samples → Examples Enhancement:
Benefits
For Users
For Developers
For Operations
Usage Examples
Infrastructure Only
Full Stack Single Region
Multi-Region Deployment
Documentation Enhancements
Comprehensive README Overhaul
Gold Standard Module Structure
Created
HOW_TO_CONTRIBUTE.mdestablishing standards for all CGD Toolkit modules:Enhanced User Experience
terraform outputfor actual valuesDocumentation Quality Improvements
Breaking Changes
Variable Structure Changes
Before:
After:
Migration Path
auto_cleanuppreferenceTesting
Validated Deployment Patterns
Regression Testing
Future Enhancements
Planned Improvements
Extensibility
The new architecture makes these enhancements straightforward:
Conclusion
This refactor transforms the DDC module from a fragmented, unreliable architecture into a production-ready, enterprise-grade solution. By eliminating circular dependencies, implementing robust cleanup mechanisms, and establishing comprehensive documentation standards, the module now serves as the gold standard for all CGD Toolkit modules.
Key Achievements:
The module is now production-ready and provides a solid foundation for game development teams deploying Unreal Cloud DDC infrastructure on AWS.